package com.zpp.vertx;

import io.vertx.core.Vertx;
import io.vertx.core.VertxOptions;
import io.vertx.core.spi.cluster.ClusterManager;
import io.vertx.spi.cluster.ignite.IgniteClusterManager;
import org.apache.ignite.Ignite;
import org.apache.ignite.configuration.IgniteConfiguration;

public class ClusteredVertx {
  IgniteConfiguration cfg = new IgniteConfiguration();
// Configuration code (omitted)

  ClusterManager clusterManager = new IgniteClusterManager(cfg);

  VertxOptions options = new VertxOptions().setClusterManager(clusterManager);

//Vertx.clusteredVertx(options, ar -> {
//    if (ar.failed()) {
//      System.err.println("Cannot create vert.x instance : " + ar.cause());
//    } else {
//      Vertx vertx = ar.result();
//      vertx.deployVerticle(CacheApp.class.getName());
//    }
//    Ignite nit = clusterManager.getIgniteInstance();
//  });
}
